Update dependencies, improve linting, and enhance module resolution#13
Merged
Conversation
- Updated dependencies in package.json: - @actions/core to ^3.0.1 - @actions/github to ^9.1.1 - @google/genai to ^2.4.0 - glob to ^13.0.6 - minimatch to ^10.2.5 - @types/jest to ^29.5.14 - @types/node to ^25.9.1 - @typescript-eslint/eslint-plugin and parser to ^8.59.4 - @vercel/ncc to ^0.38.4 - eslint to ^10.4.0 - Modified lint script in package.json to remove unnecessary file extension specification. - Added moduleNameMapper in jest configuration for better module resolution. - Refactored diff-parser.ts to remove explicit 'any' type usage. - Updated index.ts to use 'any' type with a comment for clarity. - Changed TypeScript module setting from 'commonjs' to 'esnext' in tsconfig.json. - Added new files for node-domexception and formdata-node in the dist directory. - Created a new eslint configuration file to enhance linting rules and settings.
There was a problem hiding this comment.
Pull request overview
This PR modernizes the project’s JavaScript/TypeScript tooling by upgrading major dependencies, migrating ESLint to the flat-config format, and adjusting related CI/testing settings to keep linting and builds working with the newer ecosystem.
Changes:
- Migrated ESLint configuration from legacy
.eslintrc.jsontoeslint.config.js(flat config) and updated the lint script accordingly. - Upgraded key dependencies/devDependencies (notably ESLint and
@actions/*) and refreshed the lockfile. - Updated CI workflow action versions and adjusted Jest module resolution via
moduleNameMapper.
Reviewed changes
Copilot reviewed 6 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
eslint.config.js |
Introduces ESLint v10 flat-config setup for TypeScript linting. |
.eslintrc.json (removed) |
Removes legacy ESLint configuration after migration. |
package.json |
Updates lint script, upgrades dependencies, and adds Jest moduleNameMapper entries. |
package-lock.json |
Regenerates lockfile to reflect dependency upgrades and new transitive dependencies. |
tsconfig.json |
Updates TS module settings (module: esnext) and module resolution. |
.github/workflows/ci.yml |
Updates CI actions versions for checkout/setup-node while keeping Node 20 in use. |
src/index.ts |
Adds ESLint suppression + explicit any generics around Octokit responses. |
src/diff-parser.ts |
Removes now-unneeded ESLint suppression commentary. |
dist/ |
Updates bundled GitHub Action output generated by ncc build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
| uses: actions/setup-node@v6 # v6.4.0 | ||
| with: | ||
| node-version: 20 |
Comment on lines
+34
to
44
| "@eslint/js": "^10.0.1", | ||
| "@types/jest": "^29.5.14", | ||
| "@types/minimatch": "^5.1.2", | ||
| "@types/node": "^20.14.9", | ||
| "@typescript-eslint/eslint-plugin": "^7.15.0", | ||
| "@typescript-eslint/parser": "^7.15.0", | ||
| "@vercel/ncc": "^0.38.1", | ||
| "eslint": "^8.57.0", | ||
| "@types/node": "^25.9.1", | ||
| "@typescript-eslint/eslint-plugin": "^8.59.4", | ||
| "@typescript-eslint/parser": "^8.59.4", | ||
| "@vercel/ncc": "^0.38.4", | ||
| "eslint": "^10.4.0", | ||
| "jest": "^29.7.0", | ||
| "ts-jest": "^29.2.3", | ||
| "typescript": "^5.5.3" |
Comment on lines
117
to
121
| // First, get the full file tree at the base ref | ||
| const { data: treeData } = await withRetry( | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| const { data: treeData } = await withRetry<any>( | ||
| () => | ||
| octokit.rest.git.getTree({ |
Comment on lines
142
to
146
| try { | ||
| const { data: fileData } = await withRetry( | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| const { data: fileData } = await withRetry<any>( | ||
| () => | ||
| octokit.rest.repos.getContent({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request modernizes and improves the project's linting and dependency management setup, aligning it with the latest ESLint and Node.js ecosystem standards. The most significant changes include migrating to the new flat ESLint configuration, updating dependencies (including major version bumps for several key packages), and making related workflow and configuration adjustments.
Linting and Configuration Modernization:
.eslintrc.jsonto the new flat config format ineslint.config.js, updating how ESLint is configured and how TypeScript files are linted. (eslint.config.js,.eslintrc.json) [1] [2]lintscript inpackage.jsonto match the new ESLint invocation style.Dependency Updates:
@actions/core,@actions/github,glob,minimatch,eslint,@typescript-eslint/*, and others, to their latest versions. This ensures better compatibility, security, and access to new features.Continuous Integration Improvements:
actions/checkoutandactions/setup-node, improving CI reliability and performance.Testing Configuration:
moduleNameMapperentries in the Jest configuration withinpackage.jsonto ensure correct module resolution for@actions/coreand@actions/githubduring tests.Minor Code Quality Adjustments:
any. (src/diff-parser.ts,src/index.ts) [1] [2] [3]